﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class HomeButton : MonoBehaviour
{
    public GameObject privacyPanel;

    public GameObject moreGameBtn;
    public GameObject addiconBtn;
    public GameObject quitBtn;
    public GameObject ysBtn;

    void Start()
    {
        AdManager.Instance.AddBtn(ysBtn, moreGameBtn, quitBtn, addiconBtn);
        moreGameBtn.GetComponent<Button>().onClick.AddListener(More);
        ysBtn.GetComponent<Button>().onClick.AddListener(Show);
        quitBtn.GetComponent<Button>().onClick.AddListener(Quit);
        addiconBtn.GetComponent<Button>().onClick.AddListener(AddIcon);
    }

    void Update()
    {

    }

    public void AddIcon()
    {
        AdManager.Instance.AddDesktopIcon();
    }

    public void Quit()
    {
        AdManager.Instance.Quit();
    }

    public void Show()
    {
        AdManager.Instance.Hide(privacyPanel);
    }

    public void More()
    {
        AdManager.Instance.MoreGame();
    }
}
